
package com.lin.bean;

import lombok.Builder;
import lombok.Getter;
import lombok.Singular;
import lombok.ToString;

import java.util.List;

/**
 * GoF23 设计模式之一 --- 建造者模式<br>
 * 使用 lombok 提供的 @Builder 注解实现
 */

@Getter
@ToString
@Builder
public class Product2 {
    private final String prodName;
    private final String prodType;
    private final String prodPrice;
    private final String prodColor;
    @Singular(value = "addFeatures")
    private final List<String> prodFeatures;

    private Product2(String prodName, String prodType, String prodPrice, String prodColor, List<String> prodFeatures) {
        this.prodName = prodName;
        this.prodType = prodType;
        this.prodPrice = prodPrice;
        this.prodColor = prodColor;
        this.prodFeatures = prodFeatures;
    }
}
